<%@page import="com.hongye.app.model.GoodsModel"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" isELIgnored="false"
    pageEncoding="UTF-8"%>
    <% GoodsModel gm=(GoodsModel)request.getAttribute("goodsDetail"); %>
    <% String GoodsCategroy=(String)request.getAttribute("GoodsCategroy"); %>
<!doctype html>
<html class="fixed">

	<head>
		<!-- Basic -->
		<meta charset="UTF-8">
		<meta name="keywords" content="HTML5 Admin Template" />
		<meta name="description" content="Porto Admin - Responsive HTML5 Template">
		<meta name="author" content="okler.net">
		<!-- Mobile Metas -->
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
		<!-- Web Fonts  -->
		<!-- Vendor CSS -->
		<link rel="stylesheet" href="../admin/css/bootstrap.css" />
		<link rel="stylesheet" href="../admin/css/font-awesome/css/font-awesome.css" />
        <link rel="stylesheet" href="../admin/css/select2.css" />
		<!-- Theme CSS -->
		<link rel="stylesheet" href="../admin/css/theme.css" />
		<!-- Skin CSS -->
		<link rel="stylesheet" href="../admin/css/default.css" />
		<!-- Theme Custom CSS -->
		<!-- Theme Custom ../admin/css -->
		<!-- 
		<link href="../admin/css/video-js.min.css" rel="stylesheet">
		<script src="../admin/js/video.min.js" type="text/javascript"></script>
		<link type="text/css" rel="stylesheet" href="/ueditor/third-party/video-js/video-js.css"/>
		<script language="javascript" type="text/javascript" src="/ueditor/third-party/video-js/video.js"></script>
		 -->
		<script src="../admin/js/modernizr.js"></script>
		
		<style>
		.m{ width: 800px;  margin: 5px;}
		</style>
		<script type="text/javascript" src="../admin/js/ckeditor/ckeditor.js"></script>
	</head>
	<body>
		<section role="main" class="content-body" style="margin-top: 50px;">
			<!-- start: page -->
			<section class="panel">
				<header class="panel-heading">
					<h2 class="panel-title">商品审核-详情</h2>
				</header>
				<div class="panel-body">
					<div class="panel-body">
						<p class="lead">
						<video id="example_video_1" class="video-js vjs-default-skin" controls preload="none" width="1000" height="500" 
						poster="http://120.27.117.192/rbg/upload/<%=gm.get("thumb")%>" data-setup="{}" >
					    <source src="http://120.27.117.192/rbg/upload/<%=gm.get("videoname")%>" type='video/mp4' />
						</p>
						<p> 商品名称：<input id="goodsname" type="text" name="goodsname" value='<%=gm.get("g_name") %>'> </p>
						<p>商家手机号：<%=gm.get("phone") %></p>
						<p>商家用户昵称：<%=gm.get("nick","") %></p>
						<p>店铺名称：<%=gm.get("shop_name") %></p>
						<p>所属类别：<%=GoodsCategroy %></p>
						<p>上传日期：<%=gm.get("c_time","") %></p>
						<p>商品价格(￥)：<input id="price" type="text" name="price" value='<%=gm.get("real_price") %>'></p>
						<p>商品描述：
						<div class="m">
							<textarea id="content" rows="25" cols="100" name="content" class="ckeditor"><%=gm.get("content") %></textarea>
							 <script type="text/javascript">
			                    CKEDITOR.replace('content',{
			                        language : 'zh-cn',
			                        filebrowserImageUploadUrl : './rbgGoodsDetailImg',
			                        image_previewText : ' ',
			                    });
					          </script>
						</div>
						<hr>
						<div class="mb-xs text-center">
							<a class="btn btn-facebook mb-md ml-xs mr-xs" href="javascript:void(0)" onclick="confirm()">确定 </a>
                               <a class="btn btn-facebook mb-md ml-xs mr-xs" onclick="cancel()">取消 </a>
						</div>
						<hr>
						<hr>
					</div>
			</section>
			<!-- Specific Page Vendor -->
			<!-- Vendor -->
<script src="../admin/js/jquery.js"></script>
<script src="../admin/js/layer.js"></script>
<!-- Theme Base, Components and Settings -->
<script src="../admin/js/theme.js"></script>
<!-- Theme Custom -->
<script src="../admin/js/theme.custom.js"></script>
<!-- Theme Initialization Files -->
<script src="../admin/js/theme.init.js"></script>
<!-- Examples -->
<script src="../admin/js/tables/examples.datatables.default.js"></script>
<script src="../admin/js/tables/examples.datatables.row.with.details.js"></script>
<script src="../admin/js/tables/examples.datatables.tabletools.js"></script>
<script type="text/javascript">
function confirm(){
	var gid=${gid};
	var goodsname =  $("#goodsname").val();
	var price =  $("#price").val();
	var content = CKEDITOR.instances.content.getData();
	$.post('./rbgUpdateGoodsState',{gid:gid,goodsname:goodsname,real_price:price,content:content},function(data){
		if(data=='suc'){
			location.href='./rbggoodsReview';
		}else{
			alert('更新失败!');
		}
	});
}
function cancel(){
}
</script>
</body>

</html>